package com.ty.service;

import com.ty.dto.order.OrderMaster;
import com.ty.dto.order.OrderMasterQuery;
import com.ty.dto.product.Product;
import com.ty.feignclients.ProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
@Slf4j
public class OrderService {
    @Autowired
    private ProductService productService;

    public OrderMaster select(OrderMasterQuery query) {

        Product product = productService.select(50);

        log.debug("查询到商品：{}", product);

        OrderMaster  master =   new OrderMaster().setAddressId(108).setId(1L).setNeedPay(new BigDecimal(100)).setStatus(1).setUserId(1);


        return master;

    }
}
